package com.hosever.action;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class ProDemo {
	
	public String porper() {
		InputStream inputStream = this.getClass().getResourceAsStream("/com/hosever/resource/test.properties");
		Properties p = new Properties();
		try {
			p.load(inputStream);
		} catch (IOException e1) {
			e1.printStackTrace();
		}
		System.out.println(" 姓名是: " + p.getProperty("username"));
		return p.getProperty("username");
	}

	public static void main(String[] args) {
		ProDemo p1 = new ProDemo();
		p1.porper();
	}
}
